package cn.janescott.inner.space.data.system.facade;

import cn.janescott.inner.space.data.system.dto.UserDTO;
import cn.janescott.inner.space.data.system.dto.UserSummaryDTO;
import cn.janescott.inner.space.data.system.service.UserService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 系统服务门面
 *
 * @author scott
 * @date 2018/7/25
 */
@Component
@Service(interfaceClass = SystemFacade.class, validation = "true")
public class SystemFacadeImpl implements SystemFacade {

    private UserService userService;

    @Autowired
    public void setUserService(UserService userService) {
        this.userService = userService;
    }

    @Override
    public UserDTO findByUsername(String username) {
        return userService.findByUsername(username);
    }

    @Override
    public UserSummaryDTO findSummaryByUsername(String username) {
        return userService.findSummaryByUsername(username);
    }
}

